@import '../../styles/theme.less';

.projects-container {
  position: relative;
  min-height: 100vh;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 30%, #16213e 70%, #0f3460 100%);
  font-family: @font-family;
  
  // 动态背景效果
  .projects-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    
    .particles {
      position: absolute;
      width: 100%;
      height: 100%;
      background-image: 
        radial-gradient(2px 2px at 20px 30px, @accent-color, transparent),
        radial-gradient(2px 2px at 40px 70px, @primary-color, transparent),
        radial-gradient(1px 1px at 90px 40px, @success-color, transparent),
        radial-gradient(1px 1px at 130px 80px, @warning-color, transparent),
        radial-gradient(2px 2px at 160px 30px, @accent-color, transparent),
        radial-gradient(1px 1px at 200px 60px, @secondary-color, transparent);
      background-repeat: repeat;
      background-size: 300px 200px;
      animation: particles 25s linear infinite;
      opacity: 0.6;
    }
    
    .grid-overlay {
      position: absolute;
      width: 100%;
      height: 100%;
      background-image: 
        linear-gradient(rgba(102, 126, 234, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(102, 126, 234, 0.08) 1px, transparent 1px);
      background-size: 60px 60px;
      animation: grid-move 15s linear infinite;
    }
  }
  
  // PageContainer 样式覆盖
  .ant-pro-page-container {
    position: relative;
    z-index: 1;
    background: transparent;
    
    .ant-pro-page-container-children-container {
      background: transparent;
    }
    
    .ant-page-header {
      background: rgba(255, 255, 255, 0.03);
      backdrop-filter: blur(25px);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: @radius-xl;
      margin-bottom: @spacing-lg;
      
      .ant-page-header-heading-title {
        color: rgba(255, 255, 255, 0.9);
        font-weight: 700;
        background: linear-gradient(135deg, @accent-color 0%, @primary-color 50%, @success-color 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
      }
      
      .ant-page-header-heading-sub-title {
        color: rgba(255, 255, 255, 0.6);
      }
    }
  }
  
  // 头部按钮样式
  .header-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border-radius: @radius-lg;
    transition: @transition-bounce;
    
    &:hover {
      background: rgba(255, 255, 255, 0.1);
      border-color: rgba(102, 126, 234, 0.5);
      color: white;
      box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
    }
    
    &.primary {
      background: @bg-gradient;
      border: none;
      color: white;
      
      &:hover {
        transform: translateY(-2px);
        box-shadow: @shadow-glow;
      }
    }
  }
  
  // 统计卡片样式
  .stats-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: @radius-xl;
    transition: @transition-bounce;
    position: relative;
    overflow: hidden;
    
    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: @bg-gradient;
    }
    
    &:hover {
      transform: translateY(-4px);
      box-shadow: 0 12px 24px rgba(102, 126, 234, 0.15);
      border-color: rgba(102, 126, 234, 0.3);
    }
    
    .ant-card-body {
      background: transparent;
    }
    
    .ant-statistic {
      .ant-statistic-title {
        color: rgba(255, 255, 255, 0.6);
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
      }
      
      .ant-statistic-content {
        .ant-statistic-content-value {
          color: white;
          font-weight: 700;
        }
      }
    }
  }
  
  // 项目卡片样式
  .project-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: @radius-xl;
    transition: @transition-bounce;
    position: relative;
    overflow: hidden;
    animation: float 8s ease-in-out infinite;
    
    &::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      border-radius: @radius-xl;
      padding: 1px;
      background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
      mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
      mask-composite: xor;
      -webkit-mask-composite: xor;
      opacity: 0;
      transition: opacity 0.3s ease;
    }
    
    &:hover {
      transform: translateY(-8px) scale(1.02);
      box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
      
      &::before {
        opacity: 1;
      }
    }
    
    .ant-card-body {
      background: transparent;
      position: relative;
      z-index: 1;
    }
    
    .project-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: @spacing-lg;
      
      .project-title {
        color: rgba(255, 255, 255, 0.9);
        margin: 0;
        font-weight: 600;
        position: relative;
        
        &::after {
          content: '';
          position: absolute;
          bottom: -4px;
          left: 0;
          width: 0;
          height: 2px;
          background: @bg-gradient;
          transition: width 0.3s ease;
        }
      }
      
      .ant-tag {
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: rgba(255, 255, 255, 0.8);
        border-radius: @radius-lg;
        
        &.ant-tag-success {
          background: rgba(82, 196, 26, 0.2);
          border-color: rgba(82, 196, 26, 0.4);
          color: @success-color;
        }
        
        &.ant-tag-warning {
          background: rgba(250, 173, 20, 0.2);
          border-color: rgba(250, 173, 20, 0.4);
          color: @warning-color;
        }
      }
    }
    
    &:hover .project-header .project-title::after {
      width: 100%;
    }
    
    .project-description {
      color: rgba(255, 255, 255, 0.6);
      line-height: 1.7;
      margin-bottom: @spacing-lg;
    }
    
    .project-stats {
      padding: @spacing-md;
      background: rgba(255, 255, 255, 0.05);
      border-radius: @radius-lg;
      margin: @spacing-lg 0;
      border: 1px solid rgba(255, 255, 255, 0.1);
      
      .stat-item {
        color: rgba(255, 255, 255, 0.7);
        font-size: @text-sm;
        
        .stat-icon {
          color: @primary-color;
          margin-right: @spacing-xs;
        }
      }
      
      .divider {
        color: rgba(255, 255, 255, 0.3);
      }
    }
    
    .project-actions {
      margin-top: @spacing-md;
      
      .status-select {
        .ant-select-selector {
          background: rgba(255, 255, 255, 0.05);
          border-color: rgba(255, 255, 255, 0.1);
          color: rgba(255, 255, 255, 0.8);
          
          &:hover {
            border-color: rgba(102, 126, 234, 0.5);
          }
        }
      }
    }
    
    // 卡片操作按钮
    .ant-card-actions {
      background: rgba(255, 255, 255, 0.02);
      border-top: 1px solid rgba(255, 255, 255, 0.08);
      
      li {
        .card-action-button {
          color: rgba(255, 255, 255, 0.7);
          border: none;
          background: transparent;
          transition: @transition-bounce;
          
          &:hover {
            color: @primary-color;
            background: rgba(102, 126, 234, 0.1);
            transform: translateY(-2px);
          }
          
          &.danger:hover {
            color: @error-color;
            background: rgba(255, 77, 79, 0.1);
          }
        }
      }
    }
  }
  
  // 空状态卡片
  .empty-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: @radius-xl;
    
    .ant-card-body {
      background: transparent;
    }
    
    .ant-empty {
      .ant-empty-description {
        color: rgba(255, 255, 255, 0.6);
      }
    }
    
    .create-first-button {
      background: @bg-gradient;
      border: none;
      color: white;
      border-radius: @radius-lg;
      
      &:hover {
        transform: translateY(-2px);
        box-shadow: @shadow-glow;
      }
    }
  }
  
  // 模态框样式
  .create-modal {
    .ant-modal-content {
      background: rgba(255, 255, 255, 0.03);
      backdrop-filter: blur(25px);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: @radius-xl;
    }
    
    .ant-modal-header {
      background: transparent;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      
      .ant-modal-title {
        color: rgba(255, 255, 255, 0.9);
      }
    }
    
    .ant-modal-body {
      background: transparent;
      
      .ant-form-item-label > label {
        color: rgba(255, 255, 255, 0.8);
      }
      
      .ant-input, .ant-input-affix-wrapper, .ant-select-selector {
        background: rgba(255, 255, 255, 0.05);
        border-color: rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.9);
        
        &:hover {
          border-color: rgba(102, 126, 234, 0.5);
        }
        
        &:focus, &.ant-input-focused {
          border-color: @primary-color;
          box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
        }
      }
    }
  }
  
  // 抽屉样式
  .token-drawer {
    .ant-drawer-content {
      background: rgba(255, 255, 255, 0.03);
      backdrop-filter: blur(25px);
    }
    
    .ant-drawer-header {
      background: transparent;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      
      .ant-drawer-title {
        color: rgba(255, 255, 255, 0.9);
      }
    }
    
    .ant-drawer-body {
      background: transparent;
      color: rgba(255, 255, 255, 0.8);
    }
  }
}

// 动画定义
@keyframes particles {
  0% { transform: translateY(0px) translateX(0px); }
  25% { transform: translateY(-50px) translateX(25px); }
  50% { transform: translateY(-100px) translateX(0px); }
  75% { transform: translateY(-150px) translateX(-25px); }
  100% { transform: translateY(-200px) translateX(0px); }
}

@keyframes grid-move {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-4px) scale(1.005); }
}

// 响应式设计
@media (max-width: 768px) {
  .projects-container {
    .project-card {
      .ant-card-body {
        padding: @spacing-lg;
      }
    }
  }
}